Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMP] stock_picking_package_info: duplicate moves on transfer #1242

Open
wants to merge 4 commits into
base: 8.0
Choose a base branch
from
Open

[IMP] stock_picking_package_info: duplicate moves on transfer #1242

wants to merge 4 commits into from

Conversation

cubells
Copy link
Contributor

@cubells cubells commented May 26, 2016

@oihane: There is a problem with method: create_all_move_packages

If picking lines are reserved, and picking operations exist, then this method duplicates moves because it adds the moves which quants are reserved to picking operations.

i.e.: If I have 1 line with 2 units of a product and check availability, then products are reserved and quants too with their lot_id.

If I click transfer button 2 lines operations are shown. If I remove lots because these lots are not correct, and click do_save_for_later button, picking operation lines are correct.

But when click again in transfer button, this method adds to the picking operations, 2 lines more due to quants reserved on picking line.

It's a problem because initial picking has 2 units and final picking has 4 units of product.
If this method don't create operations (the line I remove), then method do nothing.

I don't know in which cases It's necessary to change product_qty.

@cubells cubells changed the title [IMP] Movimientos duplicados al transferir [IMP] stock_picking_package_info: duplicate moves on transfer May 26, 2016
@oihane
Copy link
Contributor

oihane commented May 26, 2016

Last changes were made by @agaldona but I do not have clear what was the issue why she changed it.

@agaldona
Copy link
Collaborator

@cubells @oihane
Se añadió esa parte porque había casos en los que no mostraba todas las líneas.
Ejemplo, un albarán con 2 líneas productoA 10 unidades, productoB 5 unidades. Si en un momento dado guardo para más tarde solo productoA 5 unidades. La siguiente vez que se lanzaba el asistente, salía solo productoA 5 unidades. Ni salían las otras 5 unidades ni salia el productoB. Para intentar arreglar eso, hice la parte de generar operaciones antes de transferir.

No se si se podría plantear de otra forma.

@cubells
Copy link
Contributor Author

cubells commented May 27, 2016

ya veo el problema.

El usuario, si no aparecen las lineas, puede cancelar la reserva y volver a transferir, con lo cual, vuelven a aparecer todas las lineas.

Tu método estaria bien si no añadiera todas las reservas de las lineas del picking a las operaciones otra vez, sino que pusiera la diferencia.

En todo caso como está ahora es un problema grave porque añade lineas inexistentes al albarán. Si el encargado no se da cuenta, se facturarán lineas de más. Y eliminar las lineas cuando tienes 500 es imposible.

Hoy no tengo tiempo, pero este fin de semana repaso a ver si puedo encontrar una solución óptima.

@andhit-r
Copy link
Contributor

Functionality tested on runbot 👍

@andhit-r
Copy link
Contributor

Hi @cubells i created PR to your branch to fix travis related error.

[8.0][stock_picking_package_info] Rebase. Fix lint error
@coveralls
Copy link

coveralls commented May 30, 2016

Coverage Status

Coverage remained the same at 51.935% when pulling db7d330 on cubells:8.0 into 69d2707 on odoomrp:8.0.

@andhit-r
Copy link
Contributor

Hi @cubells travis error related to other module. Not this module. Should we fix it on this PR?

@oihane
Copy link
Contributor

oihane commented Jun 1, 2016

@andhit-r @cubells Travis errors are in modules changed on this PR, so please, can you fix them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants